#ifndef GAMEOBJECT_H
#define GAMEOBJECT_H

#include "GameAbilityVisitor.h"
#include "GameAbility.h"

#include <list>
#include <string>

class GameBehavior;

class GameObject
{
public:
	GameObject(unsigned int initialCellX, unsigned int initialCellY);
	virtual ~GameObject();

	void Accept(GameAbilityVisitor& visitor);
	unsigned int CellX() const;
	unsigned int CellY() const;

	virtual GameBehavior* GetBehavior();
	virtual void BehaviorFinished();

protected:
	void AddAbility(GameAbility* ability);
	void SetPosition(unsigned int cellX, unsigned int cellY);
private:
	void Clear();

	unsigned int cellPositionX;
	unsigned int cellPositionY;
	std::list<GameAbility*> abilities;
};

#endif //GAMEOBJECT_H
